package com.syscom.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syscom.common.entity.SysAccount;
import com.syscom.common.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wjz
 * @date 2020/11/21 22:08
 */
@Mapper
public interface SysAccountMapper extends BaseMapper<SysAccount> {

    @Select("select * from sys_role r,sys_user_role ur where r.object_id=ur.rid and ur.uid=#{id}")
    List<SysRole> selectRoleById(Long id);
}
